/*
package cn.ruituo.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

*/
/**
 * @author oldliu
 * @since 1.0
 *//*

//分页
public class Page<T> implements Serializable {
    //是否成功
    //
    private  boolean success=true;
    public final static int PAGE_DEFAULT=20;//默认页大小
    private List<T> datas=new ArrayList<>();
    private int pageNo;//当前是第几页
    private int totalLines;//总共多少条
    private int totalPages;//总共多少页
    private int pageSize=PAGE_DEFAULT;//页大小
    public Page(){}
    public Page(List<T> datas, int pageNo,int pageSize, int totalLines) {
        this.datas = datas;
        this.pageNo = pageNo;
        this.pageSize=pageSize;
        this.totalLines = totalLines;
        //计算totalPages
        totalPages=totalLines/pageSize+(totalLines%pageSize==0?0:1);
    }
    public Page(List<T> datas, int pageNo, int totalLines) {
        this.datas = datas;
        this.pageNo = pageNo;
        this.totalLines = totalLines;
        //计算totalPages
        totalPages=totalLines/pageSize+(totalLines%pageSize==0?0:1);
    }

    public List<T> getDatas() {
        return datas;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public void setDatas(List<T> datas) {
        this.datas = datas;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getTotalLines() {
        return totalLines;
    }

    public void setTotalLines(int totalLines) {
        this.totalLines = totalLines;
        //计算totalPages
        totalPages=totalLines/pageSize+(totalLines%pageSize==0?0:1);
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }
}
*/
